import {
	axios
} from "./axios.js";

export const followerAuthor = (params) => {
	return axios({
		url: '/user-follow/followerAuthor',
		method: 'get',
		params: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}

export const disLikeThisDynamicApi = (params) => {
	return axios({
		url: '/user/disLikeThisDynamicApi',
		method: 'get',
		params: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}

export const handUpOrHandDown = (params) => {
	return axios({
		url: '/thumbs-up/handUpOrHandDown',
		method: 'get',
		params: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 获取用户粉丝和关注列表
export const getFollowsAndFans = (params) => {
	return axios({
		url: '/user/getFollowsAndFans',
		method: 'get',
		params: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}

// 获取用户主页的全部信息
export const getUserDetails = (params) => {
	return axios({
		url: '/user/getUserDetails',
		method: 'get',
		params: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}

// 更改头像
export const updateAvatar = (params) => {
	return axios({
		url: '/user/updateAvatar',
		method: 'post',
		data: params,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 我的信息页面获取用户所有信息
export const getUserAllInfoInSetting = () => {
	return axios({
		url: '/user/getUserAllInfoInSetting',
		method: 'get',
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 我的信息页面获取用户所有信息
export const followerUser = (param) => {
	return axios({
		url: '/user-follow/followerUser',
		method: 'get',
		params: param,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 二维码页面获取我的信息
export const getMyBusinessCard = () => {
	return axios({
		url: '/user/getMyBusinessCard',
		method: 'get',
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}




// 获取用户的收藏列表
export const getCollectList = (param) => {
	return axios({
		url: '/user/getCollectList',
		method: 'get',
		params: param,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}




// 获取用户的帖子（笔记）列表
export const getMyPost = (param) => {
	return axios({
		url: '/user/getMyPost',
		method: 'get',
		params: param,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}



// 获取我的地址列表
export const getAddressList = () => {
	return axios({
		url: '/address/getAddressList',
		method: 'get',
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 添加地址
export const addAddress = (data) => {
	return axios({
		url: '/address/addAddress',
		method: 'post',
		data: data,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}





// 删除地址
export const deleteAddress = (data) => {
	return axios({
		url: '/address/deleteAddress',
		method: 'post',
		data: data,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}


// 根据地址aid获取地址信息
export const getAddressInfoByAid = (param) => {
	return axios({
		url: '/address/getAddressInfoByAid',
		method: 'get',
		params: param,
		headers: {
			token: uni.getStorageSync("token")
		}
	})
}